import {
  requestApi
} from '../util/network';

// 系统文章
export const getDocumentInfo = (type) =>
  requestApi('/Document/agreement', 'GET', {
    type: type,
  });

// 获取文章分类
export const getArticleclassList = () => requestApi('/Articleclass/index', 'GET', {});

// 获取文章列表
export const getArticleList = (params, acId, keywords) =>
  requestApi('/Article/article_list', 'GET', {
    ac_id: acId,
    page: params.page, // 当前第几页
    keywords: keywords,
  });

// 获取文章详情
export const getArticleDetail = (articleID) =>
  requestApi('/Article/article_show', 'GET', {
    article_id: articleID,
  });
//复制链接接口
export const getCopyLink = (htmlUrl) =>
  requestApi('/Article/receive_link', 'GET', {
    address_link: htmlUrl,
  });
  // 获取复制链接数据（文章内容）
  export const getArticleData = (artcileId) =>
  requestApi('/Article/information_link', 'GET', {
    article_id: artcileId,
  });


// 获取文章搜索结果
export const getArticleSearch = (params, keywords = '') =>
  requestApi('/Article/searchArticle', 'GET', {
    page: params.page, // 当前第几页
    keywords,
  });